package com.it.travel.controller;

import com.it.travel.service.RouteService;
import com.it.travel.vo.Params.IndexParams;
import com.it.travel.vo.Params.RouteParams;
import com.it.travel.vo.Result;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/route")
@CrossOrigin
public class RouteController {

    @Resource
    private RouteService routeService;

    @PostMapping("")
    public Result<?> getInfo(@RequestBody RouteParams routeParams) {
        System.out.println("routeParams = " + routeParams);
        Result<?> result = routeService.getInfo(routeParams);
        return result;
    }
}
